Repository navigation
net: snapshot capability and community version in host_data (P2) - #101
Merged
Merged
Conversation
Bit 24 announces snapshot serving ([snapshot] serve=on at start), bits 32-47 carry MINOR_NODE_VERSION (now 13, the community release). Peers keep the official fields in bits 0-23. Transport::peerCapabilities looks a peer up in the routing table; known_peers.json lists the known peers with what they announce. run.sh SNAPSHOT_SERVE_NODES and the snapshot-capability scenario. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…own_peers.json Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t check needs block 1000) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step P2 of docs/plans/2026-10-25-snapshot-p2p-plan.md (design 4.1, decision 15.5).
net/include/net/hostdata.hpp: encode/decode ofhost_data. Bits 0-23 keep the official layout (platform, node version); bit 24 = answers snapshot requests ([snapshot] serve=onat start; fixed for the life of the process); bits 32-47 =MINOR_NODE_VERSION; 48-63 stay 0.MINOR_NODE_VERSION= 13 (the coming community release; it was 0, the same as official nodes, so it told nothing). It is logged at start ("Node version is 532.13") and written in snapshot manifests; nothing compares it. It moves with each release from now on.cs::PeerData:capabilities,minorVersion;Transport::getKnownPeersfills them;Transport::peerCapabilities(key, caps)looks one peer up in the routing table (for the fetcher, P4).known_peers.jsonnext to the hosts file at a clean stop:{id, ip, port, version, minor, platform, capabilities}per known peer.known_hosts.txtis unchanged.ci/testnet/run.sh:SNAPSHOT_SERVE_NODES; at the end a non-serving node of this build is stopped and itsknown_peers.jsonmust list exactly the serving nodes with the capability. Robustness scenariosnapshot-capability.tests/csnode/hostdata_tests.cpp.Official nodes read bits 0-23 only and relay the value unchanged.
🤖 Generated with Claude Code